<div class="tabbable tabs-left">
              <ul class="nav nav-tabs">
              	<li><h5><?php echo $this->translate('性能优化'); ?></h5></li>
                <li class="active"><a data-toggle="tab" href="#optimization_a"><?php echo $this->translate('基本优化'); ?></a></li>
                <li><a data-toggle="tab" href="#optimization_b"><?php echo $this->translate('前台缓存'); ?></a></li>
                <li><a data-toggle="tab" href="#optimization_c"><?php echo $this->translate('cdn图片加速'); ?></a></li>
              </ul>
              <form class="form-horizontal" enctype="multipart/form-data" name="optimization_form" id="optimization_form" method="post">
              <div class="tab-content">
    			<div id="sticky_navigation" style="height:30px;border-bottom:4px solid #DFDFDF;">
        			<div class="pull-left" style="font-size:16px;line-height:30px;"><strong><?php echo $this->translate('性能优化'); ?></strong></div>
        			<div class="pull-right">
        			<a href="<?php echo $this->serverUrl(true); ?>" class="btn btn-small btn-warning"><i class="icon-repeat icon-white"></i> <?php echo $this->translate('刷新'); ?></a>
                    &nbsp;<button type="submit" class="btn btn-small btn-primary"><i class="icon-ok icon-white"></i> <?php echo $this->translate('保存性能优化设置'); ?></button>
<!--					&nbsp;<a href="--><?php //echo $this->myviewalias()->dbshopHelpUrl('optimization_set'); ?><!--" target="_blank" class="btn btn-small btn-info"><i class="icon-info-sign icon-white"></i> --><?php //echo $this->translate('查看帮助说明'); ?><!--</a>-->
                	</div>
        		</div>
                <div id="optimization_a" class="tab-pane active">
                	<div class="well admin_add_header_well"><?php echo $this->translate('基本优化'); ?></div>
                	<div class="well admin_add_well">
                	    <div class="message_one">
                    	</div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('前台Gzip压缩'); ?>：</label>
           					<div class="controls">
                                <?php if (function_exists('gzencode')) { ?>
                                    <label class="checkbox inline"><input type="checkbox" name="dbshop_front_compress" id="dbshop_front_compress" value="true" <?php if($this->dbshop_front_compress and $this->dbshop_front_compress == 'true') echo 'checked="checked"'; ?>></label>
                                <?php } else {
                                    echo $this->translate('php中的gzencode函数不可用');
                                } ?>
            				</div>                        
                        </div>

                  	</div>
                </div>

                  <div id="optimization_b" class="tab-pane">
                      <div class="well admin_add_header_well"><?php echo $this->translate('前台缓存'); ?></div>
                      <div class="well admin_add_well">
                          <div class="message_one">
                          </div>
                          <div class="control-group">
                              <label for="input01"><strong style="color: red;"><?php echo $this->translate('如果您现在正在添加商品或者对系统进行设置，建议不要开启前台缓存，商品添加完毕后，可以根据情况开启前台缓存。开启后，后台新添加的商品，可能不会在前台即时显示，需要清理缓存后才可显示。'); ?></strong></label>
                          </div>
                          <div class="control-group">
                              <label for="input01" class="control-label"><?php echo $this->translate('前台缓存状态'); ?>：</label>
                              <div class="controls">
                                  <select class="span2" name="front_cache_state" id="front_cache_state">
                                      <option><?php echo $this->translate('请选择'); ?></option>
                                      <option value="true" <?php if(isset($this->front_cache_state) and $this->front_cache_state == 'true') echo 'selected'; ?>><?php echo $this->translate('开启'); ?></option>
                                      <option value="false" <?php if(isset($this->front_cache_state) and $this->front_cache_state == 'false') echo 'selected'; ?>><?php echo $this->translate('关闭'); ?></option>
                                  </select>
                              </div>
                          </div>
                          <div class="control-group">
                              <label for="input01" class="control-label"><?php echo $this->translate('前台缓存时间'); ?>：</label>
                              <div class="controls">
                                  <input type="text" class="span2" name="front_cache_time" id="front_cache_time" value="<?php if(isset($this->front_cache_time)) echo ($this->front_cache_time>0 ? $this->front_cache_time : 1); ?>">
                                  &nbsp;&nbsp;
                                  <select class="span1" name="front_cache_time_type" id="front_cache_time_type">
                                      <option value="60" <?php if(isset($this->front_cache_time_type) and $this->front_cache_time_type == 60) echo 'selected'; ?>><?php echo $this->translate('分钟'); ?></option>
                                      <option value="3600" <?php if(isset($this->front_cache_time_type) and $this->front_cache_time_type == 3600) echo 'selected'; ?>><?php echo $this->translate('小时'); ?></option>
                                      <option value="86400" <?php if(isset($this->front_cache_time_type) and $this->front_cache_time_type == 86400) echo 'selected'; ?>><?php echo $this->translate('天'); ?></option>
                                  </select>
                              </div>
                          </div>

                      </div>
                  </div>

                  <div id="optimization_c" class="tab-pane">
                      <div class="well admin_add_header_well"><?php echo $this->translate('cdn图片加速'); ?></div>
                      <div class="well admin_add_well">
                          <div class="message_one">
                          </div>
                          <div class="control-group">
                              <label for="input01"><strong style="color: red;"><?php echo $this->translate('cdn图片加速，只会对本地商品图片进行加速处理。如果您已经在cdn服务商处开启了服务，可以在此进行设置。'); ?></strong></label>
                          </div>
                          <div class="control-group">
                              <label for="input01" class="control-label"><?php echo $this->translate('cdn加速状态'); ?>：</label>
                              <div class="controls">
                                  <label class="radio inline"><input type="radio" name="front_cdn_state" value="true" <?php if(isset($this->front_cdn_state) and $this->front_cdn_state == 'true') echo 'checked="checked"'; ?>><?php echo $this->translate('开启'); ?></label>
                                  <label class="radio inline"><input type="radio" name="front_cdn_state" value="false" <?php if((isset($this->front_cdn_state) and $this->front_cdn_state == 'false') or !isset($this->front_cdn_state)) echo 'checked="checked"'; ?>><?php echo $this->translate('关闭'); ?></label>
                              </div>
                          </div>
                          <div class="control-group">
                              <label for="input01" class="control-label"><?php echo $this->translate('加速域名'); ?>：</label>
                              <div class="controls">
                                  <select name="front_cdn_http_type" class="span2" style="width: 80px;">
                                      <option value="http://" <?php if(isset($this->front_cdn_http_type) and $this->front_cdn_http_type=='http://') echo 'selected'; ?>>http://</option>
                                      <option value="https://" <?php if(isset($this->front_cdn_http_type) and $this->front_cdn_http_type=='https://') echo 'selected'; ?>>https://</option>
                                  </select>
                                  <input type="text" class="span3" name="front_cdn_domain" id="front_cdn_domain" value="<?php if(isset($this->front_cdn_domain)) echo $this->front_cdn_domain; ?>">
                                  <font color="red"><?php echo $this->translate('域名结尾无需添加 / '); ?></font>
                              </div>
                          </div>
                          <div class="control-group localstorage">
                              <label for="input01" class="control-label"><?php echo $this->translate('前台图片样式(PC)'); ?>：</label>
                              <div class="controls">
                                  <input type="text" class="span7" name="front_cdn_image_pc_style" id="front_cdn_image_pc_style" value="<?php if(isset($this->front_cdn_image_pc_style)) echo $this->front_cdn_image_pc_style; ?>">
                                  <font color="red"><?php echo $this->translate('前台商品详情内的商品图片(非必填)'); ?></font>
                              </div>
                          </div>
                          <div class="control-group localstorage">
                              <label for="input01" class="control-label"><?php echo $this->translate('前台图片样式(Phone)'); ?>：</label>
                              <div class="controls">
                                  <input type="text" class="span7" name="front_cdn_image_phone_style" id="front_cdn_image_phone_style" value="<?php if(isset($this->front_cdn_image_phone_style)) echo $this->front_cdn_image_phone_style; ?>">
                                  <font color="red"><?php echo $this->translate('前台商品详情内的商品图片(非必填)'); ?></font>
                              </div>
                          </div>
                      </div>
                  </div>

             </div>
              </form>
</div>
<script>
<?php if ($this->success_msg != '') { ?>
show_message('.message_one','<?php echo date("Y-m-d H:i:s"); ?>','<?php echo $this->success_msg; ?>','alert-success');
<?php } ?>

$(document).ready(function() {
    $("#optimization_form").validate({
        rules: {
            front_cache_time: {
                number: true,
                min:1
            }
        },
        messages: {
            front_cache_time: {
                number: "<?php echo $this->translate('前台缓存时间必须为数字！'); ?>",
                min: "<?php echo $this->translate('前台缓存时间不能小于1！'); ?>"
            }
        }
    });
});
</script>